<template>
  <div class="evaluate" style="background-image: url('/images/gx.png'); background-repeat: no-repeat; background-size: cover;">
    <button class="black" @click="goto">返回</button>
    <div class="conten">
      <input type="text" placeholder="请说说您对本网站的评价" v-model="value" maxlength="10">
      <button @click="pub">发送</button>
    </div>

  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  data() {
    return {
      value: ''
    }
  },
  computed: {
    ...mapGetters(['userinfo'])
  },
  methods: {
    //返回
    goto() {
      this.$router.replace('/home')
    },
    //评价
    pub() {
      this.$store.dispatch('info/wzinfo', { info: this.value })
    }
  }
}
</script>

<style lang="less" scoped>
.evaluate {
  width: 100vw;
  height: 95vh;
  .black {
    height: 50px;
    width: 10%;
  }
  .conten {
    width: 30%;
    display: flex;
    align-content: c;
    margin: 0 auto;
    input {
      height: 60px;
      outline: none;
      width: 50%;
      border: none;
      margin-top: 20%;
      border-top-left-radius: 10px;
      border-bottom-left-radius: 10px;
    }
    button {
      margin-top: 20%;
      width: 20%;
      height: 60px;
      border: none;
      border-left: 1px solid black;
      border-top-right-radius: 10px;
      border-bottom-right-radius: 10px;
      vertical-align: middle;
    }
  }
}
</style>